
import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main, sim_items
from util import *

class Potion(sim_items.Potion):
    def __init__(self):
        sim_items.Potion.__init__(self, "strength", "!",
                ('have', 'more'),
                idDescription="The recipe for this highly coveted potion is "\
                    "jealously guarded by alchemists. Whether it's mauls "\
                    "that need swinging or a monster's skull that needs "\
                    "crushing, a pull from this flask should do the trick.")

    def quaff(self, quaffer):
        self.amount = random.randint(9,11)
        self.duration = 30000

        main.schedule(sim.Event('increase stat', main.schedule.time, (quaffer,
            'strengthMod', self.amount), dests=[quaffer]))
        main.schedule(sim.Event('decrease stat', main.schedule.time +\
            self.duration, (quaffer, 'strengthMod', self.amount), dests=[quaffer]))
        main.schedule(sim.Event('statusNote+', main.schedule.time, (quaffer,
            'strong'), dests=[quaffer]))
        main.schedule(sim.Event('statusNote-', main.schedule.time +\
            self.duration, (quaffer, 'strong'), dests=[quaffer]))
        quaffer.identify(self)

#========================================
thingClass = Potion



